//////////////////////////////////////////////////////////////////////////////////
//	Copyright 2011 by Yosef Grabivker, ryuho@homenetworksoft.com
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//////////////////////////////////////////////////////////////////////////////////

#ifndef REACTIONCHOOSER_H_
#define REACTIONCHOOSER_H_

#include "def.h"

class CReactionChooser: public wxPanel
{
public:
							CReactionChooser(class wxWindow* pParent, PANELTYPE type);
	virtual					~CReactionChooser();
	
	RECOVERYSTRAT			GetWarningStrat();
	RECOVERYSTRAT			GetAlarmStrat();

	void					SetWarningStrat( RECOVERYSTRAT s);
	void					SetAlarmStrat( RECOVERYSTRAT s);
	
	void					SetWarningScript( const wxString& str ) { m_strWarning = str; 	}
	void					SetAlarmScript( const wxString& str )	{ m_strAlarm = str; 	}
	
	wxString				GetWarningScript() { return m_strWarning; 	}
	wxString				GetAlarmScript()   { return m_strAlarm; 	}

	DECLARE_EVENT_TABLE()

protected:
	void					SelectValue(class	wxComboBox*	pBox, RECOVERYSTRAT s );
	void					OnWarningChanged(wxCommandEvent&);
	void					OnAlarmChanged(wxCommandEvent&);
	
private:
	RECOVERYSTRAT 			m_cWarning;
	RECOVERYSTRAT 			m_cAlarm;
	
	class	wxComboBox*		m_pcWarning;
	class	wxComboBox*		m_pcAlarm;
	
	wxString				m_strWarning;
	wxString				m_strAlarm;
};

#endif /*REACTIONCHOOSER_H_*/
